第12步:现在我们可以要求用户选择索引,以从列表中获取背景图像。

  • 点击 ,将 Ask for Integer 拖动到程序底部。
  • 将变量名称更改为 stage_index
  • .ask() 中的文本字符串更改为 "Choose an index between 0 and 5."
  • .ask() 前面的名称更改为 head

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)